﻿// Copyright (c) 2011 Blue Onion Software, All rights reserved
using System;

namespace BlueOnionSoftware.Bloget
{
    internal static class Time
    {
        internal static DateTime LocalTime(int hours, DateTime date)
        {
            if (hours < -12 || hours > 12)
            {
                throw new ArgumentOutOfRangeException("hours", hours, "-12 <= hours <= 12");
            }

            return date.AddHours(hours);
        }

        internal static int[] TimeOffsets()
        {
            return new[] {-12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
        }
    }
}